package com.linwen.excise.niuke._40;

import java.util.HashMap;
import java.util.Scanner;

/**
 * @author wlw
 * @date 2023/3/12 11:40 PM
 */
public class _40统计字符 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        char[] chars = str.toCharArray();
        HashMap<Integer, Integer> map = new HashMap<>();
        map.put(0,0);
        map.put(1,0);
        map.put(2,0);
        map.put(3,0);
        for (char aChar : chars) {
            if((aChar>='a'&&aChar<='z')||(aChar>='A'&&aChar<='Z')){
                map.put(0,map.get(0)+1);
            } else if(aChar==' '){
                map.put(1,map.get(1)+1);
            }else if(aChar>='0'&&aChar<='9'){
                map.put(2,map.get(2)+1);
            }else {
                map.put(3,map.get(3)+1);
            }
        }
        for (int i = 0; i < 4; i++) {
            System.out.println(map.get(i));
        }

    }
}
